1. Field of the Invention
The present invention relates to an image encoding technique for compressing images, and, more particularly, to an image encoding technique which is suitable for a TV conference system or TV telephone system and which enables to transmit the important image portion of a whole image, such as a person's image, etc. by compressing according to weight of each portion of the whole image.
2. Description of the Related Art
Like TV conference systems or TV telephone systems, in the case where motion pictures or static images are compressed to lower an amount of data to be transmitted.
FIG. 7 is a circuitry block diagram showing an example of an image encoder.
In FIG. 7, a frame divide circuit 101 divides an input image of one frame into an (N×M) number of blocks, writes the divided input image into a frame memory 102, and also inputs the input image to a motion prediction circuit 103. The frame memory 102 sets the written image to be delayed by one frame and inputs the delayed image to the motion prediction circuit 103. The motion prediction circuit 103 compares each block (target block) included in the frame input from the frame divide circuit 101 with a block of a previously-input frame input from the frame memory 102, which is in the same position as the position of the target block and also with its neighboring blocks of the block of the previously-input frame input from the frame memory 102, and selects a block from the compared blocks of the previously-input frame input from the frame memory 102. Then, the motion prediction circuit 103 detects a difference between the positions of the target block and the selected block to decide a movement of the target block, and sets the movement as a motion vector. An interframe prediction circuit 104 detects the position of the selected block of the previously-input frame which corresponds to the target block based on the motion vector value obtained from the motion prediction circuit 103, and calculates the differential data which represents the difference between the target block and the selected block of the previously-input frame. Then, the interframe predictor circuit 104 creates image data based on the calculated differential data in combination with the motion vector.
An orthogonal transformation circuit 105 performs DCT (Discrete Cosine Transformation) for the differential data by each block. A quantization circuit 106 quantizes data received from the orthogonal transformation circuit 105 by a step width informed from a quantization step width calculation circuit 110. An encoding circuit 107 encodes the quantized data and the motion vector value into a variable-length code and stores the quantized data in a transmission buffer circuit 108. After this, the stored data is transmitted to a transmission path at a constant rate in accordance with a transfer rate. A buffer-storage amount detection circuit 109 detects an amount of data stored in the transmission buffer circuit 108, and informs the quantization step width calculation circuit 110 about the detected amount or data stored therein. The quantization step width calculation circuit 110 calculates a quantization step width in accordance with the storage amount, and informs the quantization circuit 106 of the calculated quantization step width.
Unexamined Japanese Patent Application KOKAI Publication No. H6-169452 discloses an image compression technique which is an improved form of the above-described image compression technique. This prior art technique disclosed in the publication will now be explained with reference to FIGS. 8 and 9.
FIG. 8 is a circuitry block diagram showing an image encoder employing the image compression technique disclosed in Unexamined Japanese Patent Application KOKAI Publication No. H6-169452. In FIG. 8, a frame divide circuit 201, a frame memory 202, an interframe prediction circuit 204, an orthogonal transformation circuit 205, a quantization circuit 206, an encoding circuit 207, a transmission buffer circuit 208 and a buffer-storage amount detection circuit 209 respectively have the same functions as those shown in FIG. 7.
A motion prediction circuit 203 has the same function as the motion prediction circuit 103 shown in FIG. 7, and also stores the detected motion vector value of each block in a motion-vector-value memory 211. A block grouping section 212 arranges (classifies) blocks of the image data into groups, each of which includes blocks having the common directional vector and blocks surrounded by those blocks, according to motion vector value of each block. A function selector 213 provides a plurality of quantization step width functions, in each of which the storage amount “x” is a variable. For example, the function selector 213 has functions g1(x), g2(x), and g3(x), as shown in FIG. 9.
The function g1(x) should be employed for quantizing image data in a high level of preciseness, in association with a small quantization step width for the storage “x”. The function g2(x) should be employed for quantizing image data in a relatively low level of preciseness, in association with an intermediate quantization step width for the storage “x”. The function g3(s) should be employed for quantizing image data in a very low level of preciseness, in association with a high quantization step width for the storage “x”.
For example, in the TV conference system etc., input image data generally includes persons' image. Blocks of the face portion of the input image have the same directional vector, and occupy a relatively large area of a display screen. Hence a large number of blocks in the face portion constitute one group. Additionally, an image portion corresponds to a person's hand or an image portion corresponds to persons behind the centered person has the same motion. However, such an image portion occupies only a small area of the input image, and hence comprising only a small number of blocks forming a single group. Further a tiny piece of image data having motion in itself is composed of a very small number of blocks. Further, a static image is displayed with a group of block without any motion.
A quantization step width calculation circuit 214 calculates an quantization step width based on either one of the functions g1(x), g2(x) and g2(x), in association with each block portion, and informs the quantization circuit about the calculated step width. The transmission buffer circuit 208 transmits image data to a transmission path, in accordance with a suitable level of preciseness or the image data. Specifically, the important portion of the display screen, such as the face of the person in center of the view, is transmitted in a high level of preciseness, the hand portion of the person in the image data is transmitted in a relatively low level of preciseness, and a portion of the image data without any motion is transmitted in a very low level of preciseness.
Unexamined Japanese Patent Application KOKAI Publication No. H6-30402 discloses an image encoder which divides an input image into a plurality of blocks, determined whether each block is the most important portion of the input image based on a movement amount, size and frequency of a motion vector thereof, and assigns a relatively large number of codes to one block which has been determined as a block corresponding to the most important portion of the input image.
The following problems are found in the above prior art techniques.
As shown in FIG. 7, a circuit which employs the conventional image compression technique calculates a quantization stop width in accordance with an amount of data stored in the transmission buffer, and quantizes image data. The same function for calculating the quantization step width is employed for any of the blocks of one display screen, regardless of whether each block corresponds to the most important portion of the input image. A problem arises in that a quite large amount of data is required for a portion of the image data which is not so important in the display screen, and resulting in a lack of data for expressing the most important portion, i.e. possibly the centered person in the display screen.
A circuit which employs the image compression technique disclosed in Unexamined Japanese Patent Application KOKAI Publication No. H6-169452 includes a plurality of image blocks arranged into groups based on motion vector values, and sets a quantization step width in accordance with the number of blocks included in each group. Thus, in the case where the input image has no motion, the most important portion of the input image can not be transmitted with a high level of preciseness.
Similarly, in the image encoder disclosed in Unexamined Japanese Patent Application KOKAI Publication No. H6-30402, if there is a large motion vector in the input image data, a large number of blocks corresponding to the large motion vector are transmitted in a high level of preciseness. Thus, in the case where there is no motion in the input image, the important portion in the input image without any motion can not be transmitted in a high level of preciseness.
According to the structures or the image compression technique disclosed in Unexamined Japanese Patent Application KOKAI Publication No. H6-169452 and image encoder disclosed in Unexamined Japanese Patent Application KOKAI Publication No. H6-30402, in the case where the input image are moving in its entirety, both of the important portion and rest of portions in the input image are transmitted in the same level or preciseness. Therefore, the important portion of the input image can not be transmitted in a high level of preciseness.